package api

import request "gitee.com/changeden/volcengine-livesaas-request-go"

type ListActivityRequest struct {
	IsNeedTotalCount *bool   `json:"IsNeedTotalCount"`
	PageNo           *int32  `json:"PageNo"`
	PageItemCount    *int32  `json:"PageItemCount"`
	Name             *string `json:"Name"`
	Status           *int32  `json:"Status"`
	LiveTime         *int64  `json:"LiveTime"`
	IsLockPreview    *int32  `json:"IsLockPreview"`
}
type ListActivityResponse struct {
	Activities     []Activity `json:"Activities" gorm:"column:Activities"`
	TotalItemCount int32      `json:"TotalItemCount" gorm:"column:TotalItemCount"`
	PageItemCount  int32      `json:"PageItemCount" gorm:"column:PageItemCount"`
	PageNo         int32      `json:"PageNo" gorm:"column:PageNo"`
}
type Activity struct {
	Status          int32         `json:"Status" gorm:"column:Status"`
	CoverImage      string        `json:"CoverImage" gorm:"column:CoverImage"`
	ViewUrl         string        `json:"ViewUrl" gorm:"column:ViewUrl"`
	LiveTime        int64         `json:"LiveTime" gorm:"column:LiveTime"`
	CreateTime      int64         `json:"CreateTime" gorm:"column:CreateTime"`
	OnlineStatus    int32         `json:"OnlineStatus" gorm:"column:OnlineStatus"`
	SiteTags        []interface{} `json:"SiteTags" gorm:"column:SiteTags"`
	StreamStartTime int32         `json:"StreamStartTime" gorm:"column:StreamStartTime"`
	Id              int64         `json:"Id" gorm:"column:Id"`
	IsLockPreview   int32         `json:"IsLockPreview" gorm:"column:IsLockPreview"`
	Name            string        `json:"Name" gorm:"column:Name"`
}

func (instance *Instance) ListActivity(data *ListActivityRequest) (*ListActivityResponse, error) {
	d := request.Data{
		Action: "ListActivityAPI",
	}
	bindQuery(&d, *data)
	var res ListActivityResponse
	err := instance.get(&d, &res)
	return &res, err
}
